POV-Ray : Newsgroups : povray.newusers : vaxis_rotate : Re: vaxis_rotate Server Time
4 Sep 2024 22:20:13 EDT (-0400)
  Re: vaxis_rotate  
From: TinCanMan
Date: 17 Jul 2002 07:58:05
Message: <3d355bcd@news.povray.org>
> > #local d1link2 = vaxis_rotate(<-7,0,5>,<0,0,5>,steer);
> > #local d2link2 = vaxis_rotate(<-7,0,-5>,<0,0,-5>,steer);
> >
> > So I am wondering if there is a way to choose which axis it rotates
> > around?
>
> vaxis_rotate rotates returns the position of the first point if you
rotated it
> around the second point using the 3rd parameter as the amount to rotate.
>
> Obviously, the second point doesn't describe an axis direction on its
own - the
> axis is defined as perpendicular to a line connecting the first and second
> points, and passing through the second point.
>
> What's it doing that you don't expect?
>
I think you have it wrong here.  In 3D, there is no one vector that is
perpendicular to a given vector,  it can be any vector on the plane which is
perpendicular to the first so it coudn't possibly do what you describe
(unless I misunderstand).
What the function vaxis_rotate(A,B,F) appears to do from my understanding is
rotate pt A around the vector defined by B that passes through the origin
<0,0,0>, by the angle F in degrees.
ie. vaxis_rotate(<0,1,0>,<0,0,1>,90) gives <-1,0,0>, likewise
vaxis_rotate(<0,1,0>,<0,0,10>,90) gives the same result.

-tgq


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.